<?php
/**
 * Created by PhpStorm.
 * User: xiao
 * Date: 2018/2/8
 * Time: 17:58
 */

namespace App\Http\Common\Utils;


class DataUtils
{

    /**
     * 对象转数组
     * object to array
     * @param $object
     * @return mixed
     */
    public static function O2A($object)
    {
        //先编码成json字符串，再解码成数组
        return json_decode(json_encode($object), true);
    }

}